import sys, os
import numpy as np
import matplotlib.pyplot as plt
# Import the aims module
from soma import aims
# the brainplot package
import colorado as cld
print(sys.version)
Anatomist snapshot
%%capture
# The previous magic caputres this cell output (namely Anatomist logs)
# Import anatomist and set the environment to use it here
import anatomist.api as anatomist
os.environ["QT_API"] = "pyqt5"
%gui qt
# create an Anatomist session and capture input (so it does not appear here)
a = anatomist.Anatomist();
# load data (the SliceableObject)
t1mri = a.loadObject("data/subject01.nii")
# create an Axial window in anatomist
w = a.createWindow("Axial", geometry=[1200, 350, 500, 500])
t1mri.addInWindows(w)
# get a snapshot from anatomist
%matplotlib inline
img = cld.anatomist_snatpshot(w)
plt.imshow(img);
## View meshes
lwhite = a.loadObject("data/subject01_Lwhite.mesh")
rwhite = a.loadObject("data/subject01_Rwhite.mesh")
w3d = a.createWindow("3D")
w3d.addObjects([lwhite, rwhite])
plt.imshow(cld.anatomist_snatpshot(w3d))
meshR = aims.read('data/subject01_Rhemi.mesh')
meshL = aims.read('data/subject01_Lhemi.mesh')
cld.draw([meshL, meshR])